{extend name="./oscshop/admin/view/public/base.html" /}
{block name="content"}
<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb3}
		</small>
	</h1>
</div>

	
<table class="table table-striped table-bordered table-hover search-form">
	<thead>
		<th>
			<input name="user_name" type="text" placeholder="输入会员手机号码" value="{:input('param.user_name')}" />
			&nbsp;&nbsp;
			<input name="trade_id" type="text" placeholder="输入交易所主账号" value="{:input('param.trade_id')}" />
			&nbsp;&nbsp;
			<select name="exchange_id" id="exchange_id">
				<option value="">选择交易所</option>
				{volist id="house" name="house"}
				<option value="{$house.id}">{$house.name}</option>
				{/volist}
			</select>
			&nbsp;&nbsp;
			<a class="btn btn-primary search" href="javascript:;" url="{:url('MemberBackend/trade_acc')}">查询</a>&nbsp;&nbsp;
			<a class="btn btn-primary" href="{:url('MemberBackend/trade_acc')}" >清空查询</a>
		</th>
	</thead>
</table>	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
					    <th>ID</th>
						<th>姓名</th>
						<th>用户</th>
						<th>身份证</th>
						<th>交易所</th>
						<th>交易所主账号</th>
						<th>交易所副账号</th>
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="v"}
						<tr>						
							<td>{$v.uid}</td>
							<td>{$v.idcardname}</td>
							<td>{$v.username}</td>
							<td>{$v.idcard}</td>
							<td>{:get_exchange_name($v.exchange_id)}</td>
							<td>{$v.trade_id}</td>
							<td>{$v.sub_trade_id}</td>
						</tr>
						{/volist}	
				</tbody>
			</table>
			{$page}
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script>
	$(function(){
	   $(".search").click(function () {
			var url = $(this).attr('url');
			var query = $('.search-form').find('input,select').serialize();
			query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
			query = query.replace(/^&/g, '');
			if (url.indexOf('?') > 0) {
				url += '&' + query;
			} else {
				url += '?' + query;
			}
			window.location.href = url;
		});
	});
</script>
{/block}